package com.smxy.mall.common;

import lombok.Getter;

/**
 * 自定制异常类
 *
 * @author MoCha
 * @date 2019/5/25
 */
@Getter
public class CustomException extends RuntimeException {
    private String code;
    private String message;

    public CustomException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public CustomException(Response response) {
        this.code = response.getCode();
        this.message = response.getMsg();
    }
}
